import request from '@/utils/request'

// 获取分类树
export const getTreeApi = () => {
  return request({
    url: '/knowledgeAdmin/zsfl/list/tree',
    method: 'get',
  })
}

// 删除分类
export const deleteTypeApi = ktypeIds => {
  return request({
    url: '/knowledgeAdmin/zsfl/delete',
    method: 'delete',
    data: ktypeIds,
  })
}

// 修改分类
export const updateTypeApi = data => {
  return request({
    url: '/knowledgeAdmin/zsfl/update',
    method: 'put',
    data,
  })
}
// 添加分类
export const saveTypeApi = data => {
  return request({
    url: '/knowledgeAdmin/zsfl/save',
    method: 'post',
    data,
  })
}

// 获取分类信息
export const getInfoApi = ktypeId => {
  return request({
    url: `/knowledgeAdmin/zsfl/info/${ktypeId}`,
    method: 'get',
  })
}
